import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";
import {RequestUtil} from "../../../../util/request-util";
import {DamAPI} from "../../peach-constants";

@Injectable()
export class WaterSurfaceService {

  constructor(
    private requestUtil: RequestUtil
  ) { }

  waterSurfaceData(obj):Observable<MsgResult>{
    let params = "format=json&dataType="+obj.dataType+"&startTime="+obj.startTime+"&endTime="+obj.endTime;
    return this.requestUtil.get(DamAPI.getWaterSurfaceData,params);
  }
}
